<template>
  <div class="contact-detail-bg">
    <div class="contact-detail-header">
      <van-icon name="arrow-left" class="contact-back" @click="onBack" />
      人员详情
    </div>
    <div class="contact-detail-card">
      <div class="contact-avatar-wrap">
        <img class="contact-avatar" :src="user.avatar" />
      </div>
      <div class="contact-name">{{ user.name }}</div>
      <div class="contact-dept">{{ user.dept }}</div>
      <div class="contact-info-row"><span>手机号</span><span>{{ user.phone }}</span></div>
      <div class="contact-info-row"><span>邮箱</span><span>{{ user.email }}</span></div>
    </div>
  </div>
</template>

<script>
export default {
  name: "contactDetail",
  data() {
    return {
      user: {
        name: '李华',
        avatar: 'https://picsum.photos/100/100?random=6',
        dept: '市场部',
        phone: '13900000002',
        email: 'lihua@example.com'
      }
    }
  },
  methods: {
    onBack() {
      this.$router ? this.$router.back() : window.history.back();
    }
  }
}
</script>

<style scoped>
.contact-detail-bg {
  min-height: 100vh;
  background: #fff;
  padding-bottom: 40px;
}
.contact-detail-header {
  background: #1677ff;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  padding: 18px 0 12px 0;
  letter-spacing: 2px;
  position: relative;
}
.contact-back {
  position: absolute;
  left: 18px;
  top: 18px;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
}
.contact-detail-card {
  background: #fff;
  margin: 24px 16px 0 16px;
  border-radius: 16px;
  box-shadow: 0 4px 16px #1677ff11;
  padding: 28px 20px 32px 20px;
  border: 1px solid #e0f7fa;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-avatar-wrap {
  background: linear-gradient(135deg, #42d0ea 0%, #e0f7fa 100%);
  border-radius: 50%;
  padding: 4px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px #42d0ea33;
}
.contact-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
  background: #fff;
  display: block;
}
.contact-name {
  font-size: 20px;
  font-weight: bold;
  color: #1677ff;
  margin-bottom: 4px;
}
.contact-dept {
  font-size: 15px;
  color: #888;
  margin-bottom: 18px;
}
.contact-info-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: #333;
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f2;
}
.contact-info-row:last-child {
  border-bottom: none;
}
</style> 